<?php
namespace app\admin\controller;
use frame\lib\Db;
class Account extends Base
{
    public function index()
    {
        $this->view();
    }
    public function doEdit()
    {
        $param = $_POST;
        if(!empty($param['password']))
        {
            $pwd = md5($param['password'] . config('secure'  , 'secure_salt'));
            $res = Db::name('user')->where(['id' => $this->uid])->update(['password' => $pwd]);
            if($res) success();
            error();
        }
    }
  
}
